﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MailInputModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Admin.ViewModels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Chi tiết
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Header" runat="server">
	Menu
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Toolbar" runat="server">
	<%= Html.Toolbar("Sửa", string.Format("/Mail/Edit/{0}", Model.Mail.ID), "edit")%>
	<%= Html.Toolbar("Xóa", string.Format("/Mail/Delete/{0}", Model.Mail.ID), "delete")%>
	<%= Html.Toolbar("Quay lại", "/Mail", "back")%>
</asp:Content>

<asp:Content ID="Content6" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>  
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%if(ViewData["MessageInfo"]==null){ %>
	<fieldset>
		<legend>Chi tiết</legend>
		<table class="admintable">
			<tbody><tr>
				<td class="key">Tiêu đề</td>
				<td><%= Html.Encode(Model.Mail.Subject) %></td>
			</tr>
			<tr>
				<td class="key">MNi dung</td>
				<td><%= Html.Encode(Model.Mail.Subject) %></td>
			</tr>
			<tr>
				<td class="key">Liên kết</td>
				<td>
				<ul style="margin:0px; padding:0px;">
				    <%foreach (var item in Model.Mail.MailCategoryMaps)
                    { %>
                    <li><%=Html.Encode(item.MailCategory.Name) %></li>
				    <%} %>
				</ul>
			</tr>
			</tbody>
		 </table>
	 </fieldset>
<% } %>
</asp:Content>
